package org.come.Jpanel;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;

import com.tool.image.ImageMixDeal;
import com.tool.tcp.Sprite;
import com.tool.tcp.SpriteFactory;
import com.updateNew.MyIsif;
import org.come.until.CutButtonImage;

import com.tool.tcpimg.UIUtils;
/**
 * 功绩千秋
 * @author admin
 *
 */
public class AchievemMinJpanel extends JPanel {

	public static int x,w;
	
	public JLabel mcbel,gjbel,msgbel,imgbel;
	
	
    private ImageIcon imgwc = CutButtonImage.getImage("inkImg/hongmu/完成.png", 53, 42);

	private static Sprite triple = SpriteFactory.VloadSprite("resource/mouse/BJF (23).tcp", null);//特效路径
	public AchievemMinJpanel() {

		this.setPreferredSize(new Dimension(345, 81));
		this.setLayout(null);
		this.setBackground(UIUtils.Color_BACK);

		Font font = new Font("楷体", 1, 16);
		
		mcbel = new JLabel();
		mcbel.setFont(font);
		mcbel.setForeground(Color.WHITE);
		add(mcbel);
		gjbel = new JLabel();
		gjbel.setFont(font);
		if(MyIsif.getStyle().equals("水墨UI")){
			mcbel.setForeground(Color.black);
			gjbel.setForeground(Color.black);
		}else{
			mcbel.setForeground(UIUtils.COLOR_BTNPUTONG2[0]);
			gjbel.setForeground(Color.WHITE);
		}

		add(gjbel);
		msgbel = new JLabel();
		msgbel.setFont(font);
		if(MyIsif.getStyle().equals("水墨UI")){
			msgbel.setForeground(Color.black);
		}else {
			msgbel.setForeground(UIUtils.COLOR_BTNPUTONG2[0]);
		}
		add(msgbel);
	}

	public ImageIcon icon1 = CutButtonImage.getImage("inkImg/hongmu/gjxx.png", 345, 81);
	public ImageIcon icon2 = CutButtonImage.getImage("inkImg/background/gjxx.png", 345, 81);

	@Override
	protected void paintComponent(Graphics g) {
		super.paintComponent(g);
		if(MyIsif.getStyle().equals("水墨UI")){
			g.drawImage(icon2.getImage(), x, 0, w, 81, this);
		}else{
			g.drawImage(icon1.getImage(), x, 0, w, 81, this);
		}
		mcbel.setBounds(80, 15, 200, 20);
		gjbel.setBounds(300, 9, 100, 30);
		msgbel.setBounds(80, 45, 300, 20);
		g.drawImage(imgwc.getImage(), 210, 20, this);
		triple.updateToTime(ImageMixDeal.userimg.getTime(), 0);
		triple.draw(g, 43, 69);
	}

	public JLabel getMcbel() {
		return mcbel;
	}

	public void setMcbel(JLabel mcbel) {
		this.mcbel = mcbel;
	}

	public JLabel getGjbel() {
		return gjbel;
	}

	public void setGjbel(JLabel gjbel) {
		this.gjbel = gjbel;
	}

	public JLabel getMsgbel() {
		return msgbel;
	}

	public void setMsgbel(JLabel msgbel) {
		this.msgbel = msgbel;
	}

	public static Sprite getTriple() {
		return triple;
	}

	public static void setTriple(Sprite triple) {
		AchievemMinJpanel.triple = triple;
	}
}
